$(function(){
	/*内页幻灯片*/
	$('.js-slider-inside').flexslider({
		directionNav: true,
		pauseOnAction: false
	});			
	
	// 图片整屏切换
	$("#s1").Xslider({
		unitdisplayed:6,
		numtoMove:6,
		unitlen:181,
		autoscroll:false
	});		
	
	
	// 
	$('.summary-menu li').mouseenter(function(){
		var me = $(this),
			index = me.index();
			others = $('.summary-menu li').not(me);
			
		/*更换样式*/
		me.addClass('active');	
		others.removeClass('active');
		
		/*$('ul.summary-content-list')列表内容对应更换*/
		var active_content = $('.summary-content-each').eq(index);
		active_content.addClass('active');
		active_content.siblings().removeClass('active');
	});	
	
	
	$('.nav-each').mouseenter(function(){
		var me = $(this);
		if(me.find('.nav-list-branch').length>0){
			me.css('background','#0076db');
		}
	});

	/*导航栏切换*/
	$('.nav-each').click(function(){
		var me = $(this),
		others = me.siblings();
		me.addClass('active'),
		others.removeClass('active');
	});
	
	/*内页——左侧列表栏切换*/
	$('.inner .inner-list-main li').die().live('click',function(){
		var me = $(this),
			others = me.closest('li').siblings();
		me.addClass('active');
		others.removeClass('active');
		$('.inner-body .level-low').html(me.find('a').html());
	});
	
	/*分页切换*/
	$('.quotes a.page-a').click(function(){
		var me = $(this),
			others = $('.quotes a.page').not(me),
			index = $(".page").index(me);
		me.addClass('current-page');
		others.removeClass('current-page');
	});
	
	$('.expert-each img').each(function(){
		var me = $(this);
		me.mouseenter(function(){
			me.animate({'right':'5px'},250,'linear');	
		});
		me.mouseleave(function(){
			me.animate({'right':'0px'},200,'linear');	
		});
	});
});